// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
//导入组件、框架
import Vue from 'vue'
import App from './App'
import store from './store/index'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/style/global.scss'
import {router} from './router'
// import '@/mock/index.js/'

//导入工具、方法
import {
  getRequest,
  postRequest
} from './apis/requests/requests'
import util from './util/util'

// 公共组件
import ViewBorder from '@/components/common/ViewBorder'
import FolderCard from '@/components/common/FolderCard'
import FileCard from '@/components/common/FileCard'
import MenuItem from '@/components/common/MenuItem'
import UploadFile from '@/components/file/UploadFile'
import CreateFolder from '@/components/file/CreateFolder'
// 全局注册方法
Vue.prototype.$getRequest = getRequest;
Vue.prototype.$postRequest = postRequest
Vue.prototype.$util = util

Vue.config.productionTip = false
//将element组件注入vue实例
Vue.use(ElementUI)

//全局注册组件
Vue.component("viewBorder",ViewBorder)
Vue.component("folderCard",FolderCard)
Vue.component("fileCard",FileCard)
Vue.component("MenuItem",MenuItem)
Vue.component("UploadFile",UploadFile)
Vue.component("CreateFolder",CreateFolder)

new Vue({
  el: '#app',//通过id挂载vue实例
  router, //路由
  store,//应用级数据存储
  components: {App},
  template: '<App/>'
})
